<div class="shoot-report">
    <div class="report-body">
      <form [formGroup]="addReport">
        <div class="ui-g ui-fluid ui-md">
          <div class="ui-g-12 ui-md-12" style="line-height: 4vh">
            <div class="ui-g-1 ui-md-1 right">
              <label><span style="color: #FF8A9A">*</span>隐患发生单位:</label>
            </div>
            <div class="ui-g-4 ui-md-4 dialog-input">
              <input pInputText type="text" placeholder="请选择隐患发生单位" (click)="treeDialog = true" formControlName="organizationName"/>
            </div>
          </div>
          <div class="ui-g-12 ui-md-12"  style="line-height: 4vh">
            <div class="ui-g-1 ui-md-1 right">
              <label><span style="color: #FF8A9A">*</span>排查时间:</label>
            </div>
            <div class="ui-g-4 ui-md-4 dialog-input">
              <p-calendar [style]="{width: '100%'}" placeholder="请选择排查时间" [monthNavigator]="true" [yearNavigator]="true"
                          dateFormat="yy-mm-dd" yearRange="1949:2200" [locale]="esDate" formControlName="troubleshootingTime"></p-calendar>
            </div>
<!--            <div class="ui-g-1 ui-md-1"></div>-->
<!--            <div class="ui-g-1 ui-md-1 right">-->
<!--              <label><span style="color: #FF8A9A">*</span>整改负责人:</label>-->
<!--            </div>-->
<!--            <div class="ui-g-4 ui-md-4 dialog-input">-->
<!--              <input pInputText type="text" placeholder="请输入整改负责人"/>-->
<!--            </div>-->
          </div>
<!--          <div class="ui-g-12 ui-md-12" style="line-height: 3vh">-->
<!--            <div class="ui-g-1 ui-md-1 right">-->
<!--              <label><span style="color: #FF8A9A">*</span>整改方案:</label>-->
<!--            </div>-->
<!--            <div class="ui-g-2 ui-md-2 dialog-input">-->
<!--              <p-radioButton name="groupnamep" value="有" label="有"  [ngStyle]="{paddingRight: '2vw'}" formControlName="ifRectificationPlan"></p-radioButton>-->
<!--              <p-radioButton name="groupnamep" value="无" label="无" formControlName="ifRectificationPlan"></p-radioButton>-->
<!--            </div>-->
<!--            <div class="ui-g-1 ui-md-1 right">-->
<!--              <label><span style="color: #FF8A9A">*</span>控制措施:</label>-->
<!--            </div>-->
<!--            <div class="ui-g-2 ui-md-2 dialog-input">-->
<!--              <p-radioButton name="groupnames" value="有" label="有"  [ngStyle]="{paddingRight: '2vw'}" formControlName="ifControlMeasures"></p-radioButton>-->
<!--              <p-radioButton name="groupnames" value="无" label="无" formControlName="ifControlMeasures"></p-radioButton>-->
<!--            </div>-->
<!--          </div>-->
          <div class="ui-md-12 ui-g-12"  style="line-height: 4vh">
            <div class="ui-g-1 ui-md-1 right">
              <label><span style="color: #FF8A9A">*</span>隐患类型:</label>
            </div>
            <div class="ui-g-4 ui-md-4 dialog-input left">
              <div class="ui-g-2 ui-g-md-2">
                <p-checkbox name="groupname2" value="人"  label="人" [formControl]="addReport.controls['hidType']" ></p-checkbox>
              </div>
              <div class="ui-g-2 ui-g-md-2">
                <p-checkbox name="groupname2" value="事物"  label="事物" [formControl]="addReport.controls['hidType']"></p-checkbox>
              </div>
              <div class="ui-g-2 ui-g-md-2">
                <p-checkbox name="groupname2" value="管理"  label="管理" [formControl]="addReport.controls['hidType']"></p-checkbox>
              </div>
            </div>
            <div class="ui-g-1 ui-md-1"></div>
            <div class="ui-g-1 ui-md-1 right">
              <label><span style="color: #FF8A9A">*</span>隐患等级:</label>
            </div>
            <div class="ui-g-4 ui-md-4 dialog-input left">
              <p-dropdown dropdownIcon="pi pi-caret-down" placeholder="请选择隐患等级" [options]="hidFradeOption" formControlName="hidDangerGrade"></p-dropdown>
            </div>
          </div>
          <div class="ui-md-12 ui-g-12">
            <div class="ui-g-1 ui-md-1 right">
              <label ><span style="color: #FF8A9A">*</span>隐患描述:</label>
            </div>
            <div class="ui-g-10 ui-md-10">
              <textarea [rows]="5" [cols]="30" pInputTextarea autoResize="autoResize" style="border: 1px solid #D2D6DB" formControlName="hidDangerContent"></textarea>
            </div>
          </div>
          <div class="ui-md-12 ui-g-12">
            <div class="ui-g-1 ui-md-1 right">
              <label ><span style="color: #FF8A9A">*</span>隐患现场情况:</label>
            </div>
            <div class="ui-g-10 ui-md-10">
              <app-upload-image (selectFile)="selectImageFile($event, 'beforeImg')" #upimg [ImageOption]="ImageOption"></app-upload-image>
            </div>
          </div>
          <div style="width: 100%;height: 2px; background: #F6F6F9"></div>
          <div class="ui-g-12 ui-md-12" style="line-height: 3vh">
            <div class="ui-g-1 ui-md-1 right">
              <label><span style="color: #FF8A9A">*</span>是否处理:</label>
            </div>
            <div class="ui-g-2 ui-md-2 dialog-input" >
              <p-radioButton name="groupname1" value="是" label="是"  [ngStyle]="{paddingRight: '2vw'}" (onClick)="selectHandleType(1)" formControlName="ifDeal"></p-radioButton>
              <p-radioButton name="groupname1" value="否" label="否" (onClick)="selectHandleType(0)" formControlName="ifDeal"></p-radioButton>
            </div>
          </div>
          <div class="ui-g-12 ui-md-12"  style="line-height: 4vh" *ngIf="isHandle">
            <div class="ui-g-1 ui-md-1 right">
              <label><span style="color: #FF8A9A">*</span>治理资金:</label>
            </div>
            <div class="ui-g-4 ui-md-4 dialog-input">
              <input pInputText type="text" placeholder="请输入治理资金(万元)" formControlName="governanceFunds"/>
            </div>
          </div>
          <div class="ui-g-12 ui-md-12"  style="line-height: 4vh" *ngIf="isHandle">
            <div class="ui-g-1 ui-md-1 right">
              <label><span style="color: #FF8A9A">*</span>完成时间:</label>
            </div>
            <div class="ui-g-4 ui-md-4 dialog-input">
              <p-calendar [style]="{width: '100%'}" placeholder="请选择完成时间" [monthNavigator]="true" [yearNavigator]="true"
                          dateFormat="yy-mm-dd" yearRange="1949:2200" [locale]="esDate" formControlName="completionTime"></p-calendar>
            </div>
          </div>
          <div class="ui-md-12 ui-g-12" *ngIf="isHandle">
            <div class="ui-g-1 ui-md-1 right">
              <label > 完成情况:</label>
            </div>
            <div class="ui-g-10 ui-md-10">
              <textarea [rows]="5" [cols]="30" pInputTextarea autoResize="autoResize" style="border: 1px solid #D2D6DB" formControlName="completionSituation"></textarea>
            </div>
          </div>
          <div class="ui-md-12 ui-g-12" style="line-height: 3vh" *ngIf="isHandle">
            <div class="ui-g-1 ui-md-1 right">
              <label >整改方案:</label>
            </div>
            <div class="ui-g-4 ui-md-4 dialog-input">
              <div class="ui-inputgroup" style="position: relative">
                <input type="text" pInputText placeholder="请选择整改方案" formControlName="plan" disabled>
                <button pButton type="button" icon="pi pi-folder" class="ui-button-warn" style="background: #F8F8F8;border: 1px solid #E0E3E7;border-left: 0;color: #E0E3E7"></button>
                <input type="file" style="position: absolute;width: 35px;right: 0;height: 34px;opacity: 0" (change)="selectFile($event, 'plan')">
              </div>
            </div>
            <div class="ui-g-1 ui-md-1"></div>
            <div class="ui-g-1 ui-md-1 right">
              <label >验收报告:</label>
            </div>
            <div class="ui-g-4 ui-md-4 dialog-input">
              <div class="ui-inputgroup" style="position: relative">
                <input type="text" pInputText placeholder="请选择验收报告" formControlName="report" disabled>
                <button pButton type="button" icon="pi pi-folder" class="ui-button-warn" style="background: #F8F8F8;border: 1px solid #E0E3E7;border-left: 0;color: #E0E3E7"></button>
                <input type="file" style="position: absolute;width: 35px;right: 0;height: 34px;opacity: 0" (change)="selectFile($event, 'report')">
              </div>
            </div>
          </div>
          <div class="ui-md-12 ui-g-12" *ngIf="isHandle">
            <div class="ui-g-1 ui-md-1 right">
              <label ><span style="color: #FF8A9A">*</span>排查后隐患现场情况:</label>
            </div>
            <div class="ui-g-10 ui-md-10">
              <app-upload-image (selectFile)="selectImageFile($event, 'afterImg')" #upimgafter [ImageOption]="ImageOptionAfter"></app-upload-image>
            </div>
          </div>
        </div>
      </form>
    </div>
    <div class="report-fotter">
      <button pButton type="button" label="提交" class="ui-button-rounded" (click)="submitClcik()"></button>
<!--      <button pButton type="button" label="批量上传" class="ui-button-rounded"></button>-->
    </div>
  <!--组织树结构-->
  <p-dialog [(visible)]="treeDialog" [responsive]="true" showEffect="fade" [modal]= false [maximizable]="false" [baseZIndex]="10000" [width]="350" [height]="400">
    <div class="ui-g ui-fluid">
      <div class="ui-g-12">
        <p-scrollPanel [style]="{width: '100%', height: '250px'}">
          <p-tree
            [value]="OrgTrees"
            [(selection)]="OrgTree"
            selectionMode="single">
          </p-tree>
        </p-scrollPanel>
      </div>
    </div>
    <p-footer>
      <button  style="width: 4vw;padding: 4px 0"  (click)="treeDialog = false">取消</button>
      <button  style="width: 6vw;border: 0;color: #fff;padding: 4px 0"   (click)="dataTreeSureClick()" >确认选择</button>
    </p-footer>
  </p-dialog>
</div>
